<!DOCTYPE html>
<html>

<head>


    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!--360浏览器优先以webkit内核解析-->


    <title>我的网点拜访报告</title>

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 13px;overflow-x:auto">
<div class="page-heade clearfix">
    <h2 class="clearfix text-center">
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333" href="{:url('mynetbaifang')}">我的网点拜访任务</a>
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333;"
           href="{:url('mynetbaifang1')}">我的网点拜访报告</a>
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333;"
           href="{:url('mynetbaifang2')}">我的已安排的网点拜访线路</a>
        <a class="col-md-3 title_color H_active" style="font-size: 16px;" href="{:url('mynetbaifang3')}">我的网点拜访线路管理</a>
    </h2>
</div>
<form action="" class="form-inline" id="form1">
    <table class="table table-bordered bud_hei">
        <tr>
            <td colspan="6">
                <a href="javascript:;" class="btn btn-sm btn-primary" id="addline">新增线路</a><span class="lr_5"></span><a
                    href="{:url('Other/lendline')}" class="btn btn-sm btn-primary J_menuItem">导入线路</a> <a
                    href="{:url('mynetbaifang3issel')}" class="btn btn-sm btn-warning"
                    style="float: right;">回收站</a>
            </td>
        </tr>
        <tr>
            <td class="text-right">线路编号：</td>
            <td><input type="text" name="xlbh" class="form-control" value="{$xlbh}"></td>
            <td class="text-right">线路名称：</td>
            <td><input type="text" name="xlmc" class="form-control" value="{$xlmc}"></td>
            <td class="text-right">所属城市：</td>
            <td><input type="text" name="sscs" class="form-control" value="{$sscs}"></td>
        </tr>
        <tr>
            <td class="text-right">已选择网点：</td>
            <td><input type="text" name="bfwd" class="form-control" value="{$bfwd}"></td>
            <td class="text-right">相关人员：</td>
            <td><input type="text" name="xgry" class="form-control" value="{$xgry}"></td>
            <td class="text-right" colspan="2"></td>
        </tr>
        <tr>
            <td colspan="6" class="text-center">
                <button class="btn-sm btn-info btn">查询</button>
                <span class="lr_5"></span>
                <button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button>
            </td>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-hover bud_hei text-center" style="width: 100%;">
    <tr class="info">
        <td>拜访编号</td>
        <td>线路名称</td>
        <td>已选择网点</td>
        <td>相关人员</td>
        <td>所属城市</td>
        <td>创建人</td>
        <td>操作</td>
    </tr>
    {volist name="data" id="row"}
    <tr>
        <td>{$row.xlbh}</td>
        <td>{$row.xlmc}</td>
        <td class="text-left">{$row.bfwd}</td>
        <td class="text-left">{$row.xgry}</td>
        <td>{$row.sscs}</td>
        <td>{$row.cuser}</td>
        <td><a href="javascript:;">网点分布图</a>&nbsp;<a href="javascript:;" class="updateline" data-id="{$row.id}">修改</a>&nbsp;<a href="javascript:;" data-link="{:url('deleteline',['id'=>$row.id])}" class="delete">删除</a></td>
    </tr>
    {/volist}
</table>
<h5 class="text-center" style="font-size: 13px;font-weight: 500">
    <!--总共有12条记录，第1/2页,当前页<input id="page" type="text" style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span
        id="fistpage">首页</span>&nbsp;&nbsp;
    每页显示
    <select id="pagesize">
        <option value='10' selected>10条</option>
        <option value='15'>15条</option>
        <option value='20'>20条</option>

    </select>-->
    {$page}
</h5>
<!--    <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3> -->

<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $(function () {
        $('body').on('click', 'input[type=text]', function () {
            this.select()
        })
    })
</script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    $(document).ready(function () {
        //删除
        $('.delete').click(function () {
            var link = $(this).data('link')
            swal({
                title: "您确定清空吗",
                text: "",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "确定",
                closeOnConfirm: false
            }, function (isConfirm) {
                if(isConfirm){
                    $.ajax({
                        'type':'post',
                        'url':link,
                        'dataType':'json',
                        'success':function (data) {
                            if(data.success){
                                swal({
                                    title:data.msg,
                                    type:'success'
                                },function () {
                                    location.reload()
                                })
                            }else
                                swal(data.msg, "", "error");
                        }
                    })
                }

            });
            return false
        });

        $('#reset').on('click', function () {
            $("#form1 input").each(function () {
                $(this).val('');
            });
            $("#form1 select").each(function () {
                $(this).val('');
            });
            $('#form1').submit()
            return false
        });

        /*新增线路*/
        $("#addline").click(function () {
            layer.open({
                type: 2,
                title: '新增线路',
                area: ['1000px', '600px'],
                fixed: false, //不固定
                maxmin: true,
                content: "{:url('addline')}"
            });
            return false

        })
        /*新增线路*/
        $(".updateline").click(function () {
            var id = $(this).data('id')
            layer.open({
                type: 2,
                title: '新增线路',
                area: ['1000px', '600px'],
                fixed: false, //不固定
                maxmin: true,
                content: "{:url('updateline')}?id="+id
            });
            return false

        })
    })

</script>
</body>

</html>